package com.yr.feiyu.web;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;

import org.springframework.stereotype.Controller;

import com.yr.feiyu.common.util.ClassSearcher;

public class Test {

	public static void main(String[] args) throws Exception {
		List<Class> list= ClassSearcher.findClasses();
		String name = "dfe";
		Object o = null;
		Method m = null;
		if(list!=null&&list.isEmpty()==false){
			for(Class clz:list){
				
				Method[] ms = clz.getDeclaredMethods();
				for(Method d : ms){
					if(d.getName().equals(name)){
						o = clz.newInstance();
						m = d;
					}
				}
			}
		}
		if(o!=null && m!=null){
			m.invoke(o, new String[]{"dfe"});
		}else{
			System.out.println("wei zhao dao");
		}
	}
}
